package com.centit.framework.ip.templateFile.po;

import java.util.Date;
import java.sql.Timestamp;
import javax.persistence.Column;


import javax.persistence.Id;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;


import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;


/**
 * create by scaffold 2018-06-05 
 * @author codefan@sina.com
 
  金格文书版本信息金格文书版本信息   
*/
@Entity
@Table(name = "K_VERSION_FILE")
public class VersionFile implements java.io.Serializable {
	private static final long serialVersionUID =  1L;



	/**
	 * 主键 null 
	 */
	@Id
	@Column(name = "versionId")
	
	private String versionid;

	/**
	 * 文件主键 null 
	 */
	@Column(name = "fileId")
	@Length(min = 0, max = 50, message = "字段长度不能小于{min}大于{max}")
	private String  fileid;
	/**
	 * 模板主键 null 
	 */
	@Column(name = "recordId")
	@Length(min = 0, max = 50, message = "字段长度不能小于{min}大于{max}")
	private String  recordid;
	/**
	 * 创建时间 null 
	 */
	@Column(name = "createTime")
	private Date  createtime;
	/**
	 * 用户名称 null 
	 */
	@Column(name = "UserName")
	@Length(min = 0, max = 50, message = "字段长度不能小于{min}大于{max}")
	private String  username;
	/**
	 * 业务标记 null 
	 */
	@Column(name = "optType")
	@Length(min = 0, max = 50, message = "字段长度不能小于{min}大于{max}")
	private String  opttype;
	/**
	 * 描述 null 
	 */
	@Column(name = "Descript")
	@Length(min = 0, max = 4000, message = "字段长度不能小于{min}大于{max}")
	private String  descript;

	// Constructors
	/** default constructor */
	public VersionFile() {
	}
	/** minimal constructor */
	public VersionFile(
		String versionid		
		) {
	
	
		this.versionid = versionid;		
			
	}

/** full constructor */
	public VersionFile(
	 String versionid		
	,String  fileid,String  recordid,Date  createtime,String  username,String  opttype,String  descript) {
	
	
		this.versionid = versionid;		
	
		this.fileid= fileid;
		this.recordid= recordid;
		this.createtime= createtime;
		this.username= username;
		this.opttype= opttype;
		this.descript= descript;		
	}
	

  
	public String getVersionid() {
		return this.versionid;
	}

	public void setVersionid(String versionid) {
		this.versionid = versionid;
	}
	// Property accessors
  
	public String getFileid() {
		return this.fileid;
	}
	
	public void setFileid(String fileid) {
		this.fileid = fileid;
	}
  
	public String getRecordid() {
		return this.recordid;
	}
	
	public void setRecordid(String recordid) {
		this.recordid = recordid;
	}
  
	public Date getCreatetime() {
		return this.createtime;
	}
	
	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}
  
	public String getUsername() {
		return this.username;
	}
	
	public void setUsername(String username) {
		this.username = username;
	}
  
	public String getOpttype() {
		return this.opttype;
	}
	
	public void setOpttype(String opttype) {
		this.opttype = opttype;
	}
  
	public String getDescript() {
		return this.descript;
	}
	
	public void setDescript(String descript) {
		this.descript = descript;
	}



	public VersionFile copy(VersionFile other){
  
		this.setVersionid(other.getVersionid());
  
		this.fileid= other.getFileid();  
		this.recordid= other.getRecordid();  
		this.createtime= other.getCreatetime();  
		this.username= other.getUsername();  
		this.opttype= other.getOpttype();  
		this.descript= other.getDescript();

		return this;
	}
	
	public VersionFile copyNotNullProperty(VersionFile other){
  
	if( other.getVersionid() != null){
	this.setVersionid(other.getVersionid());}
  
		if( other.getFileid() != null){
		this.fileid= other.getFileid();}  
		if( other.getRecordid() != null){
		this.recordid= other.getRecordid();}  
		if( other.getCreatetime() != null){
		this.createtime= other.getCreatetime();}  
		if( other.getUsername() != null){
		this.username= other.getUsername();}  
		if( other.getOpttype() != null){
		this.opttype= other.getOpttype();}  
		if( other.getDescript() != null){
		this.descript= other.getDescript();}		

		return this;
	}

	public VersionFile clearProperties(){
  
		this.fileid= null;  
		this.recordid= null;  
		this.createtime= null;  
		this.username= null;  
		this.opttype= null;  
		this.descript= null;

		return this;
	}
}
